# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sipexer
pkgver=1.1.0
pkgrel=3
pkgdesc="Modern and flexible SIP (RFC3261) command line tool."
url="https://github.com/miconda/sipexer"
arch="all"
license="GPL-3.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/miconda/sipexer/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -o bin/ ./...
}

check() {
	go test ./...
}

package() {
	install -m755 -D bin/sipexer "$pkgdir"/usr/bin/sipexer
}

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}

sha512sums="
0244b2fef077b32dcc5c0c7271d950b737295d66e505ee6396851697466d6905892d250be3afe433b880fb2a9361b9243d99498684484c387bf6789e3e86035e  sipexer-1.1.0.tar.gz
"
